home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
usr
/
lib
/
command-not-found
next >
Wrap
Text File
|
2009-10-13
|
1KB
|
30 lines
#!/usr/bin/python
# (c) Zygmunt Krynicki 2005, 2006, 2007, 2008
# Licensed under GPL, see COPYING for the whole text
__version__ = "0.2.21"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/+source/command-not-found"
import CommandNotFound
import sys
from CommandNotFound.util import crash_guard, gettext_wrapper as _
from CommandNotFound import CommandNotFound
from optparse import OptionParser
def main():
parser = OptionParser(version = __version__, usage=_("%prog [options] <command-name>"))
parser.add_option('-d', '--data-dir', action='store',
default="/usr/share/command-not-found",
help=_("use this path to locate data fields"))
parser.add_option('--ignore-installed', '--ignore-installed',
action='store_true', default=False,
help=_("ignore local binaries and display the available packages"))
(options, args) = parser.parse_args()
if len(args) == 1:
cnf = CommandNotFound(options.data_dir)
cnf.advise(args[0], options.ignore_installed)
print >>sys.stderr, _("%s: command not found") % args[0]
if __name__ == "__main__":
crash_guard(main, BUG_REPORT_URL, __version__)